package com.yunji.base.convert;

import com.yunji.base.domain.MalfunctionDO;
import com.yunji.common.model.dto.MalfunctionDTO;
import com.yunji.common.utils.bean.BeanUtils;
import org.springframework.util.Assert;

/**
 * @Project: yunji-coffee
 * @Package: com.yunji.message.engine
 * @Title: MalfunctionConver
 * <p>
 * History:
 * Date                     Version     Author          Summary
 * ============================================================
 * 2024-10-30 15:12:20      V1.0        HuaAo       新建类
 */

public class MalfunctionConvert {

    public static MalfunctionDO convertDTO(MalfunctionDTO dto) {
        Assert.isTrue(BeanUtils.isNotNull(dto), "类型名称不能为空");
        MalfunctionDO malfunction = new MalfunctionDO();
        BeanUtils.clone(dto, malfunction);
        return malfunction;
    }

}